<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Ha Anh Son
 * Date: 3/28/13
 * Time: 3:39 PM
 * To change this template use File | Settings | File Templates.
 */
echo substr('abcdef', 1);     // bcdef
echo substr('abcdef', 1, 3);  // bcd
echo substr('abcdef', 0, 4);  // abcd
echo substr('abcdef', 0, 8);  // abcdef
echo substr('abcdef', -1, 1); // f